package com.inossem.warehousestorage_inossem.bean.storage;

import com.inossem.warehousestorage_inossem.bean.common.Bean;
import com.inossem.warehousestorage_inossem.bean.up_frame.UpFrameItemBean;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by Administrator on 2017/7/16 0016.
 */

public class StorageManageMatrBean extends Bean {


    /**
     * code : 200
     * msg : 公共响应信息
     * data : {"materielList":[{"materielCode":"WLBM001","materielDescription":"物料描述1","specialInventoryFlag":"K","specialInventoryCode":"K001","specialInventoryDescription":"特殊库存描述1","sendPosition":"A01","batchCode":"pc001","inventoryNumber":"100","unit":"套"},{"materielCode":"WLBM002","materielDescription":"物料描述2","specialInventoryFlag":"w","specialInventoryCode":"w011","specialInventoryDescription":"特殊库存描述2","sendPosition":"B02","batchCode":"pc222","inventoryNumber":"6","unit":"千克"}]}
     */

    private String code;
    private String msg;
    private DataBean data;




    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public DataBean getData() {
        return data;
    }

    public void setData(DataBean data) {
        this.data = data;
    }

    public static class DataBean {
        private List<MaterielListBean> materielList;

        public List<MaterielListBean> getMaterielList() {
            return materielList;
        }

        public void setMaterielList(List<MaterielListBean> materielList) {
            this.materielList = materielList;
        }

        public static class MaterielListBean {
            /**
             * materielCode : WLBM001
             * materielDescription : 物料描述1
             * specialInventoryFlag : K
             * specialInventoryCode : K001
             * specialInventoryDescription : 特殊库存描述1
             * sendPosition : A01
             * batchCode : pc001
             * inventoryNumber : 100
             * unit : 套
             */

            private String lqnum;
            private String lgnum;
            private String materielCode;
            private String materielDescription;
            private String specialInventoryFlag;
            private String specialInventoryCode;
            private String specialInventoryDescription;
            private String sendPosition;
            private String batchCode;
            private String inventoryNumber;
            private String unit;
            private List<UpFrameItemBean.DataBean.ListBean> upList = new ArrayList<UpFrameItemBean.DataBean.ListBean>();

            public List<UpFrameItemBean.DataBean.ListBean> getUpList() {
                return upList;
            }

            public String getId(){
                return getBatchCode()+","+getMaterielCode()+","+getSendPosition();
            }

            public String getLqnum() {
                return lqnum;
            }

            public void setLqnum(String lqnum) {
                this.lqnum = lqnum;
            }

            public String getLgnum() {
                return lgnum;
            }

            public void setLgnum(String lgnum) {
                this.lgnum = lgnum;
            }

            @Override
            public boolean equals(Object o) {
                if (this == o) return true;
                if (o == null || getClass() != o.getClass()) return false;

                MaterielListBean that = (MaterielListBean) o;

                return getId().equals(that.getId());

            }

            @Override
            public int hashCode() {
                return getId().hashCode();
            }

            public void setUpList(List<UpFrameItemBean.DataBean.ListBean> upList) {
                this.upList = upList;
            }

            public String getMaterielCode() {
                return materielCode;
            }

            public void setMaterielCode(String materielCode) {
                this.materielCode = materielCode;
            }

            public String getMaterielDescription() {
                return materielDescription;
            }

            public void setMaterielDescription(String materielDescription) {
                this.materielDescription = materielDescription;
            }

            public String getSpecialInventoryFlag() {
                return specialInventoryFlag;
            }

            public void setSpecialInventoryFlag(String specialInventoryFlag) {
                this.specialInventoryFlag = specialInventoryFlag;
            }

            public String getSpecialInventoryCode() {
                return specialInventoryCode;
            }

            public void setSpecialInventoryCode(String specialInventoryCode) {
                this.specialInventoryCode = specialInventoryCode;
            }

            public String getSpecialInventoryDescription() {
                return specialInventoryDescription;
            }

            public void setSpecialInventoryDescription(String specialInventoryDescription) {
                this.specialInventoryDescription = specialInventoryDescription;
            }

            public String getSendPosition() {
                return sendPosition;
            }

            public void setSendPosition(String sendPosition) {
                this.sendPosition = sendPosition;
            }

            public String getBatchCode() {
                return batchCode;
            }

            public void setBatchCode(String batchCode) {
                this.batchCode = batchCode;
            }

            public String getInventoryNumber() {
                return inventoryNumber;
            }

            public void setInventoryNumber(String inventoryNumber) {
                this.inventoryNumber = inventoryNumber;
            }

            public String getUnit() {
                return unit;
            }

            public void setUnit(String unit) {
                this.unit = unit;
            }
        }
    }
}
